/**
 * User: dizemding
 * Time: 11-7-19 下午1:14
 */
$(function() {
	$("#dialog:ui-dialog").dialog("destroy");

	$("#dialog-login").dialog({
		autoOpen: false,
		height: 310,
		width: 520,
		modal: true,
		show:"clip",
		hide:"blind",
		buttons: {
			"确定": function() {
				$('#login-form :submit').click();
			},
			"关闭": function() {
				$(this).dialog('close');
			}
		}
	});

	$("#btn_login").click(function() {
		$("#dialog-login").dialog("open");
		resetValidationCode($("#login-form #validation_image"));
	});


	$("#dialog-register").dialog({
		autoOpen: false,
		height: 590,
		width: 580,
		modal: true,
		show:"clip",
		hide:"blind",
		buttons: {
			"确定": function() {
				$('#register-form :submit').click();
			},
			"关闭": function() {
				$(this).dialog('close');
			}
		}
	});

	$("#btn_register").click(function() {
		resetValidationCode($("#register-form #validation_image"));
		$("#dialog-register").dialog("open");
	});
});

